package com.sikao.app.bean;

import java.util.List;

/**
 * Created by Sun on 2016/8/9.
 * 	[36]商品分类属性
 * 	[51-86]读取发布商品[step-2]
 */
public class CategoryAttrBean {

    /**
     * status : 1
     * msg : 成功进行操作
     * res : {"attr":[{"id":"2","name":"含水量","attr_type":"3","attr_values":[{"id":0,"value":"5%","changePrice":"0"},{"id":1,"value":"7%","changePrice":"0"},{"id":2,"value":"10%","changePrice":"0"},{"id":3,"value":"15%","changePrice":"0"},{"id":4,"value":"20%","changePrice":"0"}],"default_value":[{"id":0,"value":"5%","changePrice":"0"}],"is_filter":"0","status":"0"},{"id":"3","name":"煤燃烧值","attr_type":"3","attr_values":[{"id":0,"value":"10000大卡","changePrice":"0"},{"id":1,"value":"7000大卡","changePrice":"0"},{"id":2,"value":"5000大卡","changePrice":"0"},{"id":3,"value":"3000大卡","changePrice":"0"},{"id":4,"value":"1000大卡","changePrice":"0"}],"default_value":[{"id":2,"value":"5000大卡","changePrice":"0"}],"is_filter":"0","status":"0"}],"profilePic":[]}
     */

    private int status;
    private String msg;
    private ResBean res;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public ResBean getRes() {
        return res;
    }

    public void setRes(ResBean res) {
        this.res = res;
    }

    public static class ResBean {
        /**
         * id : 2
         * name : 含水量
         * attr_type : 3
         * attr_values : [{"id":0,"value":"5%","changePrice":"0"},{"id":1,"value":"7%","changePrice":"0"},{"id":2,"value":"10%","changePrice":"0"},{"id":3,"value":"15%","changePrice":"0"},{"id":4,"value":"20%","changePrice":"0"}]
         * default_value : [{"id":0,"value":"5%","changePrice":"0"}]
         * is_filter : 0
         * status : 0
         */

        private List<AttrBean> attr;
        private String profilePic;

        public List<AttrBean> getAttr() {
            return attr;
        }

        public void setAttr(List<AttrBean> attr) {
            this.attr = attr;
        }

        public String getProfilePic() {
            return profilePic;
        }

        public void setProfilePic(String profilePic) {
            this.profilePic = profilePic;
        }

        public static class AttrBean {
            private String id;
            private String name;
            private String attr_type;
            private String is_filter;
            private String status;
            private String content;

            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }
            /**
             * id : 0
             * value : 5%
             * changePrice : 0
             */

            private List<AttrValuesBean> attr_values;
            /**
             * id : 0
             * value : 5%
             * changePrice : 0
             */

            private List<DefaultValueBean> default_value;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getAttr_type() {
                return attr_type;
            }

            public void setAttr_type(String attr_type) {
                this.attr_type = attr_type;
            }

            public String getIs_filter() {
                return is_filter;
            }

            public void setIs_filter(String is_filter) {
                this.is_filter = is_filter;
            }

            public String getStatus() {
                return status;
            }

            public void setStatus(String status) {
                this.status = status;
            }

            public List<AttrValuesBean> getAttr_values() {
                return attr_values;
            }

            public void setAttr_values(List<AttrValuesBean> attr_values) {
                this.attr_values = attr_values;
            }

            public List<DefaultValueBean> getDefault_value() {
                return default_value;
            }

            public void setDefault_value(List<DefaultValueBean> default_value) {
                this.default_value = default_value;
            }

            public static class AttrValuesBean {
                private int id;
                private String value;
                private String changePrice="0";
                private boolean isChecked=false;//默认没有选择

                public boolean isChecked() {
                    return isChecked;
                }

                public void setChecked(boolean checked) {
                    isChecked = checked;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public String getValue() {
                    return value;
                }

                public void setValue(String value) {
                    this.value = value;
                }

                public String getChangePrice() {
                    return changePrice;
                }

                public void setChangePrice(String changePrice) {
                    this.changePrice = changePrice;
                }
            }

            public static class DefaultValueBean {
                private int id;
                private String value;
                private String changePrice;

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public String getValue() {
                    return value;
                }

                public void setValue(String value) {
                    this.value = value;
                }

                public String getChangePrice() {
                    return changePrice;
                }

                public void setChangePrice(String changePrice) {
                    this.changePrice = changePrice;
                }
            }
        }
    }
}
